import React, { Component } from 'react'
import { Form,Modal,Input} from 'antd';
const FormItem = Form.Item;
const { TextArea } = Input;
const formItemLayout = {
    labelCol: {
        span: 8,
    },
    wrapperCol: {
        span: 14,
    }
};

class RejectModal extends Component {
  render() {
      const {form,isTure,okReject,onCancelReject} = this.props;
      const {getFieldDecorator} = form;
    return (
      <div>
        <Modal
            title="拒绝报修"
            visible={isTure}
            onOk={okReject}
            onCancel={onCancelReject}
            okText="确认"
            cancelText="取消"
            >
            <Form>
                <FormItem label="理由" {...formItemLayout}>
                    {getFieldDecorator('comment', {
                        rules: [
                            { required: true, message: '拒绝理由不能为空' },
                        ],
                    })(
                        <TextArea rows={4} placeholder="请输入拒绝的理由" />
                    )}
                </FormItem>
            </Form>
        </Modal>
      </div>
    )
  }
}
export default Form.create()(RejectModal)
